<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"  %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>办事指南</title>
    <base href="<%=basePath%>">
    <%@ include file="/main/main_css.jsp" %>
    <%@ include file="/main/main_js.jsp" %>
    <script src="JS/A4Print.js"></script>
    <script src="JS/main.js"></script>
</head>
<body>
    <!--  -->
    <div class="all-wrapper">
        <div class="row com-header text-center">
            <span>鹰潭市行政服务中心</span>
        </div>
        <div class="row main-content time-table" id="ss">
        	<div class="row" >
                <div class="time-count pull-right">
                   <span>剩余</span> <span id="time" class="text-red"></span> <span>秒</span>
                </div>
            </div>
		<div class="row">
                <h1>回执单</h1>
        </div>
           <table class="table table-bordered time-table-com" style="border:1px solid #efefef;">
                <tbody>
                	<tr>
                        <td class="x">受理编号</td>
                		<c:if test="${Receipt.TRACKID ne null}">
                        	<td>${Receipt.TRACKID }</td>
                        </c:if>
                        <td class="x">申请单位/申请人</td>
                        <td colspan="3">${Receipt.APPLICANT }</td>
                    </tr>
                    <tr>
                    </tr>
                     <tr>
                        <td class="x">申请联系人</td>
                        <td>${Receipt.LINKMAN }</td>
                        <td class="x">手机号</td>
                        <td>${Receipt.PHONE }</td>
                    </tr>
                     <tr>
                        <td class="x">受理情况</td>
                        <td>
                        	<c:if test="${!empty Receipt.TRACKID }">受理</c:if>
                        	<c:if test="${empty Receipt.TRACKID }">不受理</c:if>
                        </td>
                        <td class="x">受理日期</td>
                        <td>${Receipt.DATE }</td>
                    </tr>
                     <tr>
                        <td class="x">受理机关/联系人</td>
                       <td>${Receipt.NORMACCEPTDEPART }</td>
                        <td class="x">联系电话</td>
                       <td>${Receipt.TELPHONE }</td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="row footer">
        	<a class="btn btn-success btn-lg" href="toindex" role="button"><i class="fa fa-reply"></i>返回首页</a>
            <a class="btn btn-primary btn-lg" href="javascript:void(0);" role="button" onclick="printHtmlA4();"><i class="fa fa-hand-pointer-o"></i>打印</a>
            <%-- <a class="btn btn-primary btn-lg" id="mybutton" href="/smartTerminal/toemail?prokeyid=${prokeyid }"><i class="fa fa-hand-pointer-o"></i>办理材料寄送</a> --%>
        </div>
        <input type="hidden" id="hItemName"  value="${Receipt.ITMENAME }">
        <input type="hidden" id="hTrackid"  value="${Receipt.TRACKID }">
        <input type="hidden" id="hApplicant"  value="${Receipt.APPLICANT }">
        <input type="hidden" id="hLinkMan"  value="${Receipt.LINKMAN }">
        <input type="hidden" id="hPhone"  value="${Receipt.PHONE }">
        <input type="hidden" id="hDate"  value="${Receipt.DATE }">
        <input type="hidden" id="hNormacceptdepart"  value="${Receipt.NORMACCEPTDEPART }"> 
        <input type="hidden" id="hTelphone"  value="${Receipt.TELPHONE }">
        <input type="hidden" id="hBase64"  value="${base64}">   
    </div>
    <form id="loginOut" action="loginOut"></form>
  <script type="text/javascript">
	//加入倒计时
		var count =  119;
		function countdown(){
			$("#time").text(count);
			if(count > 0){
				window.setTimeout("countdown()",1000);
				count --;
			}else{
				$("#loginOut").submit();
			}
		}
		countdown();
  
//页面加载动画
	var index = layer.load(3, {
	    shade: [0.3,'#000'] //0.1透明度的白色背景  
	});
	setTimeout(function(){
	    layer.close(index);
	},500);
  
  	$("#time").shijian();
  	function printHtmlA4(){
  		var test = '<div style="height:100%;width:100%;margin-left:26px;">';
  			test += '<div style="margin-top:200px;align:center;"><h1 style="margin-left:15%;font-size: 24px;">'+$('#hItemName').val()+'受理回执单</h1></div>';
     		test += '<table border="1" cellspacing="0" bordercolor="#000000" width = "80%" style="margin-top:20px;align:center;">';
    		test += '<tr><td >受理编号:</td><td >'+$('#hTrackid').val()+'</td><td>申请单位/申请人:</td><td >'+$('#hApplicant').val()+'</td></tr>';
         	test += '<tr><td >申请联系人:</td><td>'+$('#hLinkMan').val()+'</td><td >手机号:</td><td>'+$('#hPhone').val()+'</td></tr>';
         	test += '<tr><td >受理情况:</td><td>受理</td><td >受理日期:</td><td>'+$('#hDate').val()+'</td></tr>';
         	test += '<tr><td >受理机关/联系人:</td><td>'+$('#hNormacceptdepart').val()+'</td><td >联系电话:</td><td>'+$('#hTelphone').val()+'</td></tr>';
     		test += '</table><div style="margin:0 auto;display: table;"><img style="height:200px;width:200px" src="data:image/png;base64,'+$('#hBase64').val()+'"></div>';
     		test += '</div>';
   	   	    send_command(
  	        "printhtml",
  	      	test,
  	        function (json) {
  	            
  	        });
	   	   	var index = layer.load(3, {
			    shade: [0.3,'#000'] //0.1透明度的白色背景  
				});
		   layer.msg('文件打印中,请稍等片刻......', {time:3000}); 
				setTimeout(function(){
				    layer.close(index);
			},3000);
  	}
  </script>
</body>
<script src="static/js/common.js" type="text/javascript"></script>
</html>
